package com.bole.fallback;

import com.bole.data.Result;
import com.bole.data.ResultEnum;
import com.bole.dto.permission.AdminDto;
import com.bole.feign.AdminFeign;
import org.springframework.stereotype.Component;

/**
 * @author yakamaxi
 * @version 1.0
 * @date 2020/8/12 17:21
 */
@Component
public class AdminFeignFallback implements AdminFeign {
    @Override
    public Result get() {
        return Result.response(ResultEnum.FAIL).setData("熔断");
    }

    @Override
    public Result getByName(String username) {
        return Result.response(ResultEnum.FAIL);
    }

    @Override
    public Result add(Long rid, AdminDto adminDo) {
        return Result.response(ResultEnum.FAIL).setData("熔断");
    }

    @Override
    public Result getById(Long id) {
        return Result.response(ResultEnum.FAIL).setData("熔断");
    }

    @Override
    public Result updateById(Long id, Long rid, AdminDto admin) {
        return Result.response(ResultEnum.FAIL).setData("熔断");
    }

    @Override
    public Result deleteById(Long id) {
        return Result.response(ResultEnum.FAIL).setData("熔断");
    }
}
